package com.example.wryproject.database;

import ohos.data.orm.AllChangeToTarget;
import ohos.data.orm.OrmContext;
import ohos.data.orm.OrmObjectObserver;

// 定义一个观察者类
public class MyOrmObjectObserver implements OrmObjectObserver {
    @Override
    public void onChange(OrmContext changeContext, AllChangeToTarget subAllChange) {
        // 用户可以在此处定义观察者行为
        int inserSize = subAllChange.getInsertedList().size();
        int updateSize = subAllChange.getUpdatedList().size();
        int deleteSize = subAllChange.getDeletedList().size();
    }
}